CXX = g++
CXXFLAGS = -g -Wall
AR = ar

SRCS = Source.cpp Time.cpp Suite.cpp CollectorOutput.cpp TextOutput.cpp HtmlOutput.cpp CompilerOutput.cpp Utils.cpp
OBJS = $(SRCS:%.cpp=%.o)
TARGET = libuavtest.a

.PHONY: all
all: depend $(TARGET)

-include depend

$(TARGET): $(OBJS)
	$(AR) -qc $(TARGET) $(OBJS)

depend: $(SRCS)
	$(CXX) -MM $(CXXFLAGS) $^ > $@

$(OBJS): $(SRCS)
	$(CXX) -c $(SRCS) $(CXXFLAGS)
	
.PHONY: install
install:
	cp libuavtest.a ../../lib/libuavtest.a

.PHONY: clean
clean:
	rm -f *.o $(TARGET)

.PHONY: clean-depend
clean-depend:
	rm depend
